package com.gxa.shop.service.account.impl;


import com.gxa.shop.bean.pojo.Account;
import com.gxa.shop.dao.account.AccountDao;
import com.gxa.shop.dao.account.impl.AccountDaoImpl;
import com.gxa.shop.service.account.RegisterService;
import com.gxa.shop.util.MD5Utils;

public class RegisterServiceImpl implements RegisterService {

    AccountDao accountDao=new AccountDaoImpl();

    @Override
    public boolean register(Account account) {
        // 设置密码加密
        account.setPassword(MD5Utils.md5(account.getPassword()));
        return accountDao.register(account)>0;
    }
}
